// Playground - noun: a place where people can play

//数组

var array = ["A","B","C","D","D","E","F"]
var array2:[String] = ["A","B","C","D","D","E","F"]
var array3:Array<String> = ["A","B","C","D","D","E","F"]

array[0] = "aa"
array

var array4 = [Int]()
//var str = String()
var array5 = Array<String>()

var array6:[Int] = []
array6.append(2)

var array7:Array<Int> = []

array = []
array = [String]()
array = Array<String>()

array6 = [Int](count:10, repeatedValue:0)

var array8 = [2,3,4]
var array9 = array6 + array8

array2.count

array.isEmpty

array.append("G")
array += ["H"]
array += ["I","J","K"]

array.insert("A", atIndex: 0)

array.removeAtIndex(0)
array

array.removeLast()
array

//array.removeRange(Range<Int>(1...2))

array[0]
array[0] = "AA"
array

array[1...3] = ["CC","DD","EE"]
array

array[1...3] = ["Hello"]
array

//array[100]

for index in 0..<array.count
{
    println(array[index])
}

for item in array
{
    println(item)
}

for (index, item) in enumerate(array)
{
    println("Index \(index) item \(item)")
}












